package com.pinyoumei.app.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.pinyoumei.app.R;
import com.pinyoumei.app.bean.FirstBean;
import com.pinyoumei.app.bean.FirstNewBean;

import java.util.List;

/**
 * Created by Administrator on 2021-08-09.
 * --------- 日期 ------- 维护人 ------------ 变更内容 --------
 * 2021-08-09        Administrator             新增Person类
 * 2021-08-09        Administrator             增加sex属性
 */
public class TopFirstNewAdapter extends BaseQuickAdapter<FirstNewBean.ResultBean.HomeIconListBean, BaseViewHolder> {
    public TopFirstNewAdapter(int layoutResId, @Nullable List<FirstNewBean.ResultBean.HomeIconListBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, FirstNewBean.ResultBean.HomeIconListBean item) {
        ImageView iv_top_icon1 = helper.getView(R.id.iv_top_icon1);
        Glide.with(mContext).load(item.getModel_img()).into(iv_top_icon1);

        helper.setText(R.id.tv_icon_name1,item.getModel_name());
    }
}
